<?php
include_once('common/header.php');	
if($AppUI->id < 0) {
	Vfriend_Function::redirect(HOST_VFRIEND);
}	
$strRefer		= isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
$strContent		= $objRequest->getParam('pcontent','');
$intUserId		= Vfriend_Function::base64D($objRequest->getParam('puserid',''));
$strContent		= Vfriend_Function::stripTags($strContent,2);
$strFullName	= $objRequest->getParam('pfullname','');
$intError 		= 0;
if($strContent == '') $intError = 1;
if($intError == 0 && $intUserId > 0) {
	$objFullhouse = new Fullhouse();
	$objFullhouse->add($AppUI->id, $intUserId, $strContent);
	if($AppUI->id == $intUserId) {
		$strMessage = $arrMessage[1];
	} else {
		$strMessage = $arrMessage[2];
	}
	$strMessage	= str_replace('[strUsername]',$strFullName,$strMessage);
	Vfriend_Function::setMsg($strMessage);
} else {
	$intError = 2;
}
if($intError > 0) {
	$strError 	= $arrError[$intError];
	$strError	= str_replace('[strUsername]',$strFullName,$strError);
	Vfriend_Function::setError($strError);	
}
Vfriend_Function::redirect($strRefer);
?>